export default {
  namespaced: true,
  state() {
    return {
      fieldsA: ["nameit", "ext_field3"],
      fieldsB: ["article_brief", "hbn"],
      fieldA: "nameit",
      fieldB: "article_brief",
      flag: true,
    };
  },
  mutations: {
    // 同步state中用户的信息
    updateField(state) {
      state.flag = !state.flag;
      let index = state.flag ? 0 : 1;
      state.fieldA = state.fieldsA[index];
      state.fieldB = state.fieldsB[index];
    },
  },
};
